<%@ page import="org.gnomus.server.Context" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Map" %>
<%
  Context ctx = Context.get();
  List<Map> lessons = (List<Map>) ctx.data.get("lessons");
%>
<div style="width:640px; margin:0 auto;">
  <h3>
    Scores
  </h3>
  <div id="scores" class="border-1" style="padding:16px;">
    <%
      if (lessons == null || lessons.size() == 0) {
    %>
    <p>
      No scores found.
    </p>
    <%
      } else {
    %>
    <table>
    <%
        for (Map lesson : lessons) {
    %>
    <tr>
      <td>
        <a href="/score/view?lesson_id=<%= lesson.get("id") %>">
          <%= lesson.get("title") %>
        </a>
      </td>
    </tr>
    <%
        }
    %>
    </table>
    <%
      }
    %>
  </div>
</div>